UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jqD60Ka2R1zyFu9asp3uCXLOYxeLvVHL5+HlsQnpc2E='
WHERE
key_id = '68b30c0c4b4ecda7aaa7935470b41d86f761b251b303f6d11efa667836fd8693'
AND (
token = 'jqD60Ka2R1zyFu9asp3uCXLOYxeLvVHL5+HlsQnpc2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)