UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7h2hs7co7qZ6P4kQUpbtMMmn9ed2nUEpD7u5JOE4M2o=' 
WHERE 
  key_id = '2b7ac992192ee8d92de4eeaea42090282996dc80a3da6b74b0dc51c719c97f3b' 
  AND (
    token = '7h2hs7co7qZ6P4kQUpbtMMmn9ed2nUEpD7u5JOE4M2o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024