UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3KuQA07FSBvK1rfp4jP4mKWZ9cKXYQ/mAZWEu4xPWEU='
WHERE
key_id = 'e04c02aaa47a5bd115bcd896907800d414fb3498ed6c6cd07fba6146250d976a'
AND (
token = '3KuQA07FSBvK1rfp4jP4mKWZ9cKXYQ/mAZWEu4xPWEU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)