UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/3NWLiGQdSqBG0PPzOROW73Es9DQWWnL/yqgzkmFUvs=' 
WHERE 
  key_id = '4ff1d13b98156cb4f5b173bdce7ec6c54f6f6710a9aca04f515da2f1f7e9c604' 
  AND (
    token = '/3NWLiGQdSqBG0PPzOROW73Es9DQWWnL/yqgzkmFUvs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031