UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BLqUnPW9BeVL4JYRvmJnzRMRfu0J7dH0uIl/DJTWuRM='
WHERE
key_id = '63b04ac15145b20a21b296b3cec1d892e577e48fd9a563f830f97fa6eafcf673'
AND (
token = 'BLqUnPW9BeVL4JYRvmJnzRMRfu0J7dH0uIl/DJTWuRM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)