UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DtFq/n6tBcTZVE3rBW/ttXmKcKCkoZTfJSt5s5Jn6aM=' 
WHERE 
  key_id = 'ada0801db4396ca1f0c137f0ed89cbfc33618cc61f46fbf4ba090e5ac6ae593b' 
  AND (
    token = 'DtFq/n6tBcTZVE3rBW/ttXmKcKCkoZTfJSt5s5Jn6aM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054