UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CAxDVgopUL3D+hd9Lk8Cfe2Q01Doe/KSH+P8S9dhTZI='
WHERE
key_id = '99daa79e143a0ba162fbfd4ba7faf9372813bbfbb0a74624b9b4a5a6cac06e3c'
AND (
token = 'CAxDVgopUL3D+hd9Lk8Cfe2Q01Doe/KSH+P8S9dhTZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)