UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vUWcf+a5kb/JA2RUXLtXqsBYHW2/4LYoQoMO2X4eVXM='
WHERE
key_id = '44b2f25746170aa3b81fb05e058d37017b2e2ffbe42e1542c182edf68d04b276'
AND (
token = 'vUWcf+a5kb/JA2RUXLtXqsBYHW2/4LYoQoMO2X4eVXM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)