UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vau9eajfFA7wK8ifrrrgltxgbESB8p7IM9GdxRvH/Ds=' 
WHERE 
  key_id = '2b0e7833f5c67550ed88ddcf7e3502f1538af26d240830720ba11b3f4ec08651' 
  AND (
    token = 'vau9eajfFA7wK8ifrrrgltxgbESB8p7IM9GdxRvH/Ds=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036