UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nrI2EMJDZUm6zThRkRkUL5/hFoTZnNRZTeULplRq2xU='
WHERE
key_id = '77960b7d4cf100e8de74417a76bd454ec2f9cf861ebcc7c2498c8e1c42dddae9'
AND (
token = 'nrI2EMJDZUm6zThRkRkUL5/hFoTZnNRZTeULplRq2xU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)