UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Qq8LB+/qunV7omO3G84f2jCgI0CMJAuqiH4t7Fn4qKc=' 
WHERE 
  key_id = 'af53dcec4b15a49a998fc678588b5e242c3cada67f36353cb0ae84b4a5853297' 
  AND (
    token = 'Qq8LB+/qunV7omO3G84f2jCgI0CMJAuqiH4t7Fn4qKc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030