UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't97pWvEDuOorOFHoVjt20xvWalqGtg/hyvvy2inifsE=' 
WHERE 
  key_id = '7aa407297662cb33bda0bc1a293c06ca7d02e64cc3867e9f57ffbfdca8a54fbe' 
  AND (
    token = 't97pWvEDuOorOFHoVjt20xvWalqGtg/hyvvy2inifsE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019