UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+vX0Dx8tMm6+27ens+uz+JaB6mtk0WQlVXN2TzpTwwk='
WHERE
key_id = '7c3890dadf18d487576245a852b8d034e07759b3c73c8a93d32fffaa8638f3ca'
AND (
token = '+vX0Dx8tMm6+27ens+uz+JaB6mtk0WQlVXN2TzpTwwk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)