UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'NuRmzRCHEWRVeqQ90OZCJrNzZyDTx5D/zaLbXs3EkfA=' 
WHERE 
  key_id = 'c4ac15f263e6ee3ec9f07dbfd99b9e3be3ca1048ea3069436ad489bf3773dbe2' 
  AND (
    token = 'NuRmzRCHEWRVeqQ90OZCJrNzZyDTx5D/zaLbXs3EkfA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017