UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8lhzhiEhmaKNKZo9Fgzf+zYSNXCrTmfDSjE0vJdmjmc='
WHERE
key_id = '60f32ca1de56ac267c73efd49b113c0066b89401648a3f1c09f7cc14d21611e8'
AND (
token = '8lhzhiEhmaKNKZo9Fgzf+zYSNXCrTmfDSjE0vJdmjmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)