UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qGloNrOLtMghVE/H4Lm1WbSMOtDakuwJpp/9jnLmglc=' 
WHERE 
  key_id = 'df3b6e938dfb5764c1497b8af1b4062b09349184501768f2eb8fe073f4697664' 
  AND (
    token = 'qGloNrOLtMghVE/H4Lm1WbSMOtDakuwJpp/9jnLmglc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035