UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G7Z+s9nlkjEg2QAqcYTku8yDxC+hhwp/jaxz9xNwkZI='
WHERE
key_id = '60da96c7b42cbcc2c8c4cd18a180a018673e3b196aad2904754cc3e3dd1a63f6'
AND (
token = 'G7Z+s9nlkjEg2QAqcYTku8yDxC+hhwp/jaxz9xNwkZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)