UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+1A819WuyPYIan2NOs5OnXaBkMAhujGq48Yz4azTZtY='
WHERE
key_id = '129be89e48c0fdb29910c500ad7cd6783bf9c3d923e3893880ca0de82af851f7'
AND (
token = '+1A819WuyPYIan2NOs5OnXaBkMAhujGq48Yz4azTZtY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)