UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+9YgYSyFwQkfb0GmdAWnIFYfRfWw3KSWyhlNE0zo5II=' 
WHERE 
  key_id = 'dcd58e25d350d93b2981a8b1e5b64ac1169b1ee4a03953e2b843a90643c8bbc2' 
  AND (
    token = '+9YgYSyFwQkfb0GmdAWnIFYfRfWw3KSWyhlNE0zo5II=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022