UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/sKs50WwWCk0/29/ZODbGSXpZ0Jw++BiX4RnGqPP4MM=' 
WHERE 
  key_id = '02ae9f9f463f9b8640ab1d2523e37531b56641ea9b5607de005da1ddbe2de080' 
  AND (
    token = '/sKs50WwWCk0/29/ZODbGSXpZ0Jw++BiX4RnGqPP4MM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00081