UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lPrAoQ5EbivGyqBlsZXtwRYLrPH4tN8u1ujNFdAZuXU=' 
WHERE 
  key_id = '98df1cc374b1a0ec5908cf70a7cb75bc9c16d1a24ceb2d41f269e6e9bed0683a' 
  AND (
    token = 'lPrAoQ5EbivGyqBlsZXtwRYLrPH4tN8u1ujNFdAZuXU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024