UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5Q+hUQlTW+eYCqo0LN4nm9JQkMNtZ3ZYQFJgNi+OkfY='
WHERE
key_id = '4c72e9f80cec6d4a1c3bb1e72c7e3de21117aaf68d2583b3086797808c0bf09f'
AND (
token = '5Q+hUQlTW+eYCqo0LN4nm9JQkMNtZ3ZYQFJgNi+OkfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)