UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fr+aiSKBcOISC0zP6J+ZONNDJKRy/S00FjVSdjWveaA='
WHERE
key_id = '7805b4ce06be4ad5d02ba693da9ac78a31c2b3d25541e2488bbc65cd7c8daef8'
AND (
token = 'Fr+aiSKBcOISC0zP6J+ZONNDJKRy/S00FjVSdjWveaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)