UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pxCipbqWZjxIYRddp4IfNIE9/f/oGbKWpf+7TwVMb9c='
WHERE
key_id = '25401adf3fcbeefc685414cc0f8a0572a0e3f94d90308a162509272fd5dcb668'
AND (
token = 'pxCipbqWZjxIYRddp4IfNIE9/f/oGbKWpf+7TwVMb9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)