UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F+8//VZ/ihaGeFD93zAXWKZgk+uVXJpvZ5h3KkKcOBg='
WHERE
key_id = 'e262a753eb5bef0f1dd439b573b17efefcad508f761263a3d63a6493024a95a0'
AND (
token = 'F+8//VZ/ihaGeFD93zAXWKZgk+uVXJpvZ5h3KkKcOBg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)