UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+9SPEzL2r5bWiXTluKpuPg2W9MhCFyG5Ff+lpZNpngA='
WHERE
key_id = '85ffa00b86cdeab2de091f4106254982b840f39aaf904a9bd37b38e6dfae1e4a'
AND (
token = '+9SPEzL2r5bWiXTluKpuPg2W9MhCFyG5Ff+lpZNpngA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)