UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HqrfpDFXHb1/GPuvmobVZvl8LbvYNGduSNjvZQAg0rQ='
WHERE
key_id = '63258325d95a2a0da75ed12c30139f814af4cba9e8fb6e5bf630ac36e624d24e'
AND (
token = 'HqrfpDFXHb1/GPuvmobVZvl8LbvYNGduSNjvZQAg0rQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)