UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EQhss9401DQ8LmDAFXxEDhArFADv+Y/NibiAisMqliM=' 
WHERE 
  key_id = '9ab722622ea2a7d0b2c891f6d7229b8aaa4fb2c49153f84808b40fbe5dbc29c7' 
  AND (
    token = 'EQhss9401DQ8LmDAFXxEDhArFADv+Y/NibiAisMqliM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015