UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rA4+O/7LoHPF0nky/D+FNbVI4q5IeSPsyaL7gUZOHTk=' 
WHERE 
  key_id = '72d63b9f0938da8f20a0e1adb21ff0ba3195dc3a9d2fe20d39e56bdd4b0da0a2' 
  AND (
    token = 'rA4+O/7LoHPF0nky/D+FNbVI4q5IeSPsyaL7gUZOHTk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028