UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xoZ7//zJZl+tMg6kaHggVoLp8w+IelmHwCvzNOkD5QY='
WHERE
key_id = '809d210aab665c236480c24ebf3c065c2347c24af0595d21de211ec49b972ecc'
AND (
token = 'xoZ7//zJZl+tMg6kaHggVoLp8w+IelmHwCvzNOkD5QY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)