UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DQlONsnqUoblvwNp/m+IqfxCiL7KdO6Ru034KT0ERlE='
WHERE
key_id = '891f9d73138962e951018c5ae7c36f5e7bc8f80f92e202584eef2b11f0440c8c'
AND (
token = 'DQlONsnqUoblvwNp/m+IqfxCiL7KdO6Ru034KT0ERlE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)