UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vam0wASE9juOqLC0kL2DB64RCZBvBqs9CPX4AxCW32U=' 
WHERE 
  key_id = 'b793dbdfcbfa40d355c0a914412be0aa4f541ded76ff3eab699c39f480207a68' 
  AND (
    token = 'Vam0wASE9juOqLC0kL2DB64RCZBvBqs9CPX4AxCW32U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028