UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Hxzmp6aLa/79AWfCvRsG032cAf43uzX3N14NCRTq/kc=' 
WHERE 
  key_id = 'db06d38e69e89bf0b9faba75d9445724b1a84db8cacaffc26ad6c5d4f63db008' 
  AND (
    token = 'Hxzmp6aLa/79AWfCvRsG032cAf43uzX3N14NCRTq/kc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025