UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kzfbtiegLA9hGMV7VmkArbFe3oXX9e7rXaB4nvt4AgQ='
WHERE
key_id = '5bbf8ed147a51849d4f3adf33b9246ef3fcbc212507c75888d71566f8caf83c0'
AND (
token = 'kzfbtiegLA9hGMV7VmkArbFe3oXX9e7rXaB4nvt4AgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)