UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hs/anh2iHD1qCYOI8/ATZ8hCaTZPcr1lwG3Kjxvm+TQ='
WHERE
key_id = 'b6e302e0476e2e476feabe37576bf75619acc43204f1d04ba82c45356eaac44e'
AND (
token = 'Hs/anh2iHD1qCYOI8/ATZ8hCaTZPcr1lwG3Kjxvm+TQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)