UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0FfGBfQ+D4YzPjl2sYNWlyIKt1ZqMlfCb03Cr5kM4VI='
WHERE
key_id = '2ac73c95a920a466e61e1e373a53b71f2954a68d93ec0abac28188095aeacbc1'
AND (
token = '0FfGBfQ+D4YzPjl2sYNWlyIKt1ZqMlfCb03Cr5kM4VI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)