UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DQK/xEm2Q0+jf5gNzS3PcflQJqYFpAgsNxH37lF2/dE=' 
WHERE 
  key_id = '3b37bac83d04d97bfa72df6a95d07b5cf7fc4fe946c9e2546eaf30d2a8000a5a' 
  AND (
    token = 'DQK/xEm2Q0+jf5gNzS3PcflQJqYFpAgsNxH37lF2/dE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020