UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NbtNn3oPmz/8W6MWRwV5E6YxK5qrh/uwqhOsFZdfesY='
WHERE
key_id = '60fb675a8e7cd559447845a4ac65c9225a0b6efe59e8f6c146cabe7ff50a9117'
AND (
token = 'NbtNn3oPmz/8W6MWRwV5E6YxK5qrh/uwqhOsFZdfesY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)