UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+db+2nESjefsBwYOCAulI0LmSES1yWkRyI5votdCOoY='
WHERE
key_id = '3a19e58cba17e2207665634b62289dddf61ee3617baee67f0efafcdc8f3b96d2'
AND (
token = '+db+2nESjefsBwYOCAulI0LmSES1yWkRyI5votdCOoY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)