UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pGPIErt3EFd/RUd9vTgsDKFoM+7MS3q++2rgdr1KR1U='
WHERE
key_id = '82c9be33b6526b5cb86840b309831471a3592cb54ff17f492e7c20c64a8cba22'
AND (
token = 'pGPIErt3EFd/RUd9vTgsDKFoM+7MS3q++2rgdr1KR1U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)