UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OG8OVubIBYX6hEbgDlAsqln4SnnP+SOJqSyju6Ajfxo=' 
WHERE 
  key_id = 'aa056320de35664436d514d0e7c6ef945eff97e56e3bee2c94d449e09d7f3f88' 
  AND (
    token = 'OG8OVubIBYX6hEbgDlAsqln4SnnP+SOJqSyju6Ajfxo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037