UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jtH1EsmhSC0DQ2LR/Hdm7Eo+NzS9V9TpdQELHlKUZfg='
WHERE
key_id = '91a71697cbddfec1c0f82dac2ce93ec77585e22b12e3c08e356533f68c9887c1'
AND (
token = 'jtH1EsmhSC0DQ2LR/Hdm7Eo+NzS9V9TpdQELHlKUZfg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)