UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9miLim6Ws9GKvkX3Xuvu04XymW/Y/BVMxLdDMs/vBeI='
WHERE
key_id = '7232839bbff3e32e713a96ed0b4c03794f5ee068ef4ebc2ae9df5fd0d459da80'
AND (
token = '9miLim6Ws9GKvkX3Xuvu04XymW/Y/BVMxLdDMs/vBeI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)