UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U2ae6bUhIJssOH8Dm2u7iH2BbHaAfWeUUfSE26jHt7w=' 
WHERE 
  key_id = 'febbfeb7acdd003acdeb8a80eda2b2f6f85f4d13d1cea1505c78c0b40bd556a4' 
  AND (
    token = 'U2ae6bUhIJssOH8Dm2u7iH2BbHaAfWeUUfSE26jHt7w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042