UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/bYlwQsn+G6k9dzvXPdBgmoRwvGMFh8XcEvUOPSL00g=' 
WHERE 
  key_id = 'ae2343a9c182d5dca7f8345d7d13a192dc181f253edd94fb0c8c94ec76b864b8' 
  AND (
    token = '/bYlwQsn+G6k9dzvXPdBgmoRwvGMFh8XcEvUOPSL00g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026