UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EJVVjFW67gFJYMwDilXlFMZ6jSxgXCxEVEkcKvVJfco=' 
WHERE 
  key_id = '7a00fc598a3ba51eaabc9794ca89c4c0cebd7f863dbbba0f0384d663911f4d2b' 
  AND (
    token = 'EJVVjFW67gFJYMwDilXlFMZ6jSxgXCxEVEkcKvVJfco=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020