UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7kBf84kZnWNCYv8JjthP2JEyu4xczJoFbPbqhux/e2M='
WHERE
key_id = '91278f24c56b57afce39d703d6ef89a56078be3798ce331c1269d67481efd4f9'
AND (
token = '7kBf84kZnWNCYv8JjthP2JEyu4xczJoFbPbqhux/e2M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)