UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XWkzCjGKhXi/S90eKk5U12Phzzp/y8gsw1HrB0xeJ98='
WHERE
key_id = '06cbef2f1b768682e5e3ee3de2a68b66753bfa1f2fbde156bb15f7a9ef1dec84'
AND (
token = 'XWkzCjGKhXi/S90eKk5U12Phzzp/y8gsw1HrB0xeJ98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)