UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zPUITHnte4r8xHZMg5ZL1r8U4MA67pYLwB2EzqH/FGw='
WHERE
key_id = 'f32e88db25c5e33c8018c148d39b111e9f97bae14da19ca3b12c0e6fcf855d1a'
AND (
token = 'zPUITHnte4r8xHZMg5ZL1r8U4MA67pYLwB2EzqH/FGw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)