UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'szyOvSwAJutQqEknYuIxEJYLAJuwcGke7QxCHk/8xQk='
WHERE
key_id = '749fb7170311da853b71f466f1642b4f5ece17dbbf03f0ae5e82e6ca24e2bbf7'
AND (
token = 'szyOvSwAJutQqEknYuIxEJYLAJuwcGke7QxCHk/8xQk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)