UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZArR2px7VEBVo75QlQhjlVuWBB4CBxaHp77awBvqBqM='
WHERE
key_id = '960f47d051160b6fdc3c26b891851ebc5593425e7bcc438e76b67c38e31ac4fb'
AND (
token = 'ZArR2px7VEBVo75QlQhjlVuWBB4CBxaHp77awBvqBqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)