UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GRqJbZcrURiz3rER47Goib0Yaq+OecmmSfE0CZmZ0xU='
WHERE
key_id = '60f2892134d55b5e8ac8740c62a37915dd50ce16e4306289dc819fbb8b4e9278'
AND (
token = 'GRqJbZcrURiz3rER47Goib0Yaq+OecmmSfE0CZmZ0xU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)