UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fuq3+ODb2FiKzDfgh3aDmEimvPJx1bLQYhcCMghJDY4='
WHERE
key_id = 'dfcfd6b3eb805b571fd2bf40104c7cefd7ea30cd6e6d2f7eccbdaec70f73b3c3'
AND (
token = 'Fuq3+ODb2FiKzDfgh3aDmEimvPJx1bLQYhcCMghJDY4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)