UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9PVfIVbVomTcu6vaeWc2fz3iY5QBMNrEELIJgDNTTu8=' 
WHERE 
  key_id = '3c4685ec395c7f88849a0bbb6be2eeba9102ce4b79e4dee969d23b90adba2aa4' 
  AND (
    token = '9PVfIVbVomTcu6vaeWc2fz3iY5QBMNrEELIJgDNTTu8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020