UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'un+uTYr7hBZbPhZjxtJHfqT7ov3j2Lud7PY1ryD/7/g='
WHERE
key_id = '68292112ef42b7f6b56b00785f66f3755d3ea2f0eb28d756ddc53f46efe6f51d'
AND (
token = 'un+uTYr7hBZbPhZjxtJHfqT7ov3j2Lud7PY1ryD/7/g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)