UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rl/2UtsOVz59ebUogjBCwBlcdjnnA9acg8JKvngL1YA=' 
WHERE 
  key_id = 'e2356484b89110a7787a83e2de258724219a3f231119013055930abfe444733d' 
  AND (
    token = 'rl/2UtsOVz59ebUogjBCwBlcdjnnA9acg8JKvngL1YA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017