UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+p5zE6phViKFURHRVdIYp1X/EONEq7yjk5sYNPqzmgQ='
WHERE
key_id = 'ce3096548efc3377ba46a623d736bd115165be410692faa76888f268061dd9d2'
AND (
token = '+p5zE6phViKFURHRVdIYp1X/EONEq7yjk5sYNPqzmgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)